using System;
using System.Text;
using PCC.Notification;

namespace PCC.App.Notification
{
    public class Notification : INotification
    {
        public Notification(string completeEmail)
        {
            string[] parseStr = completeEmail.Split(
                new[]
                    {
                        Environment.NewLine
                    },
                StringSplitOptions.None
                );

            Subject = parseStr[0];
            var sb = new StringBuilder();
            for (int i = 1; i < parseStr.Length - 1; i++)
            {
                sb.Append(parseStr[i]);
            }
            Body = sb.ToString();
        }

        #region INotification Members

        public string Body { get; set; }

        public string Subject { get; set; }

        #endregion
    }
}